<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ImageGallery.aspx.cs" Inherits="Utils_ImageGallery" %>
<%@ Register Assembly="WebControls" Namespace="WebControls" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Image Gallery</title>
    <base TARGET="_self">
      
    <script src="/js/Controls.js" type="text/javascript"></script>
</head>
<body bgcolor="#f2f1ef">
    <form id="form1" runat="server">
        <div>
            <table width="100%">
                <tr>
                    <td colspan="2">
                    <cc1:SFLabel ID="lblImageGallery" runat="server"></cc1:SFLabel>
                    </td>
                </tr>
                <tr>
                    <td width="100%" valign="top"> 
                    <div style="overflow:scroll;height:350px">
                    <asp:DataList ID="dltPictures" runat="server" RepeatColumns="3" RepeatDirection="Horizontal" ItemStyle-Width="33%" HorizontalAlign="justify" Width="100%">
                        <ItemTemplate>
                            <asp:Image ID="ibtPreview" runat="server" Width="100px" ImageUrl='<%#DataBinder.Eval(Container.DataItem,"ImageSource") %>' OrgWidth='<%#DataBinder.Eval(Container.DataItem,"Width") %>' OrgHeight='<%#DataBinder.Eval(Container.DataItem,"Height") %>' />
                        </ItemTemplate>
                    </asp:DataList>
                    </div>
                    </td>
                    <td valign="top" width="200px">
                        <input type="hidden" runat="server" id="hdnImage" />
                        <img src="" id="imgPreview" width="200px" height="150px" /><br />
                        <cc1:SFLabel ID="lblWidth" runat="server" ></cc1:SFLabel>&nbsp;<cc1:SFNumericBox ID="txtWidth" runat="server"></cc1:SFNumericBox><br />
                        <cc1:SFLabel ID="lblHeight" runat="server" ></cc1:SFLabel>&nbsp;<cc1:SFNumericBox ID="txtHeight" runat="server"></cc1:SFNumericBox><br />
                        <cc1:SFButton ID="btnInsert" runat="server"  OnClick="btnInsert_Click" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <cc1:SFLabel ID="lblUploadFile" runat="server" ></cc1:SFLabel>
                        <asp:FileUpload ID="flUpload" runat="server" />
                        <cc1:SFButton ID="btnUpload" runat="server" OnClick="btnUpload_Click" />
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
